/**
 * 获取键盘高度
 */
export async function getKeyboardHeight() {
  uni.onKeyboardHeightChange((obj) => {
    // 获取系统信息
    let _sysInfo = uni.getSystemInfoSync()
    let _heightDiff = _sysInfo.screenHeight - _sysInfo.windowHeight
    let _diff = obj.height - _heightDiff
    // 键盘高度
    let height = (_diff > 0 ? _diff : 0) - 2 + 'px'
    return Promise.resolve(height)
  })
}
